from mongo_client import MongoClient


class BaseDBModel(object):
    def __init__(self):
        self.dbclient = MongoClient()

    def get_tablename(self):
        pass

    def list(self):
        table = self.get_tablename()
        return self.dbclient.find(table)


class DomainDBModel(BaseDBModel):
    def get_tablename(self):
        return "domain"
